<!--
 * @Author: your name
 * @Date: 2021-10-08 19:22:37
 * @LastEditTime: 2021-10-08 21:30:00
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue3.0\vue3_vite\src\pages\connection\test2\child.vue
 * inject 两个参数：1.传递的名称， 2.默认值
-->
<template>
  <h1>child</h1>
  <p>传入的值：{{ faCount }} -- {{ number }}</p>
</template>

<script>
import { inject } from 'vue'
export default {
  setup(props) {
    const faCount = inject('faCount')
    const number = inject('number', 10)

    return {
      faCount,
      number
    }
  }
}
</script>

<style>

</style>